import './styles/theme.css'

import CountUp from './components/CountUp.vue'
import CButton from './components/CButton.vue'
import CElButton from './components/CElButton.vue'

const components = [CountUp, CButton, CElButton]

installComponents()

// 单独引用
function installComponents() {
  components.forEach(component => {
    component.install = function(app) {
      app.component(component.name, component)
    }
  })
}

// 全局引用
const install = (app) => {
  components.forEach(component => {
    app.component(component.name, component)
  })
}
const cAll = { install }

export { CountUp, CButton, CElButton }
export default cAll
